package com.paradogs.gs.modules.attr;

import lombok.Getter;
import lombok.experimental.Accessors;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: yumi
 * @date: 2024/10/23  18:05
 * @Description: 游戏属性
 */
@Getter
@Accessors(fluent = true)
public enum AttrType {

    HP(1),
    MP(2),
    ATK(3),
    DEF(4),
    CD(5),
    HIT(6),
    ;

    private int id;
    AttrType(int id) {
        this.id = id;
    }

    private static Map<Integer, AttrType> map = new HashMap<>();
    static {
        for (AttrType type : AttrType.values()) {
            map.put(type.id, type);
        }
    }
    public static AttrType get(int id) {
        return map.get(id);
    }


}
